#include "stdlib.h"
#include "stdio.h"
#include "string.h"
#include "zlib.h"

int main(int argc,char *argv[])
{
    char *str = "dies ist ein testfile\n";
    int i;
    int gz_level     = 0;
    int gz_strategy  = Z_DEFAULT_STRATEGY;

    gzFile gzout=gzopen("test.dat","w");
    if( gzsetparams(gzout,gz_level,gz_strategy) != Z_OK ) {
	printf("error\n"); exit(1);
    }

    for(i=0; i<100; i++) {
	gzwrite(gzout,str,strlen(str));
    }

    gzclose(gzout);
}
